<div class="wrapper-xs" ng-init="vm.init()">
    <div class="panel panel-default">
        <div class="panel-heading font-bold">数据库配置列表</div>
        <div class="panel-body">
            <a ng-click="vm.add()" class="btn btn-info btn-sm m-l-sm">新增</a>
            <a ng-click="vm.update()" ng-disabled="!vm.row.checked" class="btn btn-success btn-sm m-l-sm">更新</a>
        </div>
        <div class="table-responsive">
            <table ng-table="vm.tableParam" class="table table-condensed table-bordered table-hover table table-striped table-bordered" >
                <tbody>
                <tr ng-repeat="row in $data track by $index">
                    <td data-title="'选择'" width="7%" align="center">
                        <label class="i-checks i-checks-sm"> <input type="radio" ng-checked="row.checked" ng-click="vm.choice(row)" name="curRadio"/><i></i></label>
                    </td>
                    <td title="'数据库名称'" sortable="'dbName'" >{{row.dbName}}</td>
                    <td title="'数据库类型'" sortable="'dbType'" >{{row.dbType}}</td>
                    <td title="'数据库地址'" sortable="'dbUrl'">{{row.dbUrl}}</td>
                    <td title="'数据库端口'" sortable="'dbPort'">{{row.dbPort}}</td>
                    <td title="'数据库SID'"  sortable="'dbSid'">{{row.dbSid}}</td>
                    <td title="'数据库用户'" sortable="'dbUsername'">{{row.dbUsername}}</td>
                    <td title="'数据库密码'" sortable="'dbPassword'">{{row.dbPassword}}</td>
                    <td title="'操作'">
                        <a class="btn m-b-xs btn-sm btn-danger btn-addon" ng-click="vm.remove(row.id)">删除</a>
                        <a class="btn m-b-xs btn-sm btn-success btn-addon" ng-click="vm.connectTest(row)">连接测试</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div ng-include="'views/dbprofile/include/addInfo.html'" id="addInfo" style="display: none;width: 98%"></div>
